import store from '@/store'

/**
 * Mixin混入
 */

// 获取登录身份
export default {
  data () {
    return {
      currentUserName: '', // 当前登录用户的姓名
      currentUserIdentify: '' // 当前登录用户的身份
    }
  },
  created () {
    this.getCurrentUserIdentify()
    this.getCurrentUserName()
  },
  methods: {
    getCurrentUserIdentify () {
      this.currentUserIdentify = store.getters.identify
      return this.currentUserIdentify
    },
    getCurrentUserName () {
      this.currentUserName = store.getters.name
      return this.currentUserName
    }
  }
}
